home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 27.zip
/
BS1 part 27
/
ImageMaster_d3.adf
/
dd.LZH
/
neg.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1991-11-08
|
2KB
|
66 lines
/* ARexx - Negative does a simple negative operation in IM */
/*
* This is how to do a 'process' operation. Processes are very simple,
* all you need to do is backup the image to the undo buffer,
* then run the process, then redraw. That's all there is to it!
*
* If you want to do image loaders and savers, see the examples used
* for the PMBC format. There is considerably more involved
* ARexx logic involved in deciding what to do with the new buffer,
* allocating the right size (you have to look at the source image
* to see what that size is!). Anyway, it's still pretty easy.
*
* Feel free to use our examples as 'boilerplate' for your own work.
*/
/*
* open rexxsupport.library -- needed for some functions
*/
if ~show('L',"rexxsupport.library") then do
if addlib('rexxsupport.library',0,-30,0) then do
/* everything's ok */
end;
else do
say 'We Have A Library Problem, Unable To Load "rexxsupport.library"';
say 'Cannot operate NEG.rexx without this library - sorry!';
exit 10;
end;
end;
/*
* This will automatically direct the script to the proper
* software, if it is running. No matter where the script is
* launched from.
*/
prtnme = 'IP_Port'; /* assume Image Professional */
if show('P','IP_Port') = 0 then do
if show('P','IM_Port') = 0 then do
say "Can't find image processor's ARexx port!!!"; /* not running? */
say "This script requires IP, IM or IM F/c to run!";
exit(20);
end;
else do
prtnme = 'IM_Port'; /* That's the thing about assumptions... */
end; /* We make em, user's break em. */
end;
address(prtnme); /* talk to image system user is running */
'wbtofront';
options results;
'jackin'; /* get the pointer to the Public Interface */
jacker = result;
options;
'backuptoundo'; /* make sure user can UNDO the result */
address command;
'negative '||jacker; /* run the actual operation (See the 'c' code) */
address(prtnme);
'tofront'; /* processor screen to front */
'redraw'; /* redraw results */
exit 0;